package cn.com.dwr.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.com.dwr.entity.AppAddress;
import cn.com.dwr.service.AppAddressService;
import cn.com.dwr.mapper.AppAddressMapper;
import org.springframework.stereotype.Service;

/**
* @author 邓文润
* @description 针对表【app_address】的数据库操作Service实现
* @createDate 2023-12-12 07:13:55
*/
@Service
public class AppAddressServiceImpl extends ServiceImpl<AppAddressMapper, AppAddress>
    implements AppAddressService{

    @Override
    public AppAddress getDefault(long userId) {
        return this.getOne(new QueryWrapper<AppAddress>()
                .eq("is_default", true)
                .eq("user_id", userId));
    }
}




